package com.wu.framework.http;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * 分页
 */
@Import(PageMethodArgumentResolver.class)
public class PageWebMvcConfigurer implements WebMvcConfigurer {


    @Bean
    public PageMethodArgumentResolver pageMethodArgumentResolver() {
        return new PageMethodArgumentResolver();
    }

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(pageMethodArgumentResolver());
    }
}
